package net.koodar.forge.system.menu.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import net.koodar.forge.mybatis.doman.BaseEntity;

/**
 * 资源权限表
 *
 * @author liyc
 */
@Data
@TableName("sys_menu")
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class Menu extends BaseEntity<Menu> {

	@TableId(value = "id", type = IdType.AUTO)
	private Long id;

	/**
	 * 父节点 id
	 */
	@TableField("parent_id")
	private Long parentId;

	/**
	 * 资源权限名称
	 */
	@TableField("name")
	private String name;

	/**
	 * 资源权限显示名称
	 */
	@TableField("title")
	private String title;

	/**
	 * 菜单类型
	 * 1:目录; 2:菜单; 3:按钮
	 */
	@TableField("type")
	private Integer type = 1;

	/**
	 * 图标
	 */
	@TableField("icon")
	private String icon;

	/**
	 * 权限注解
	 */
	@TableField("perms")
	private String perms;

	/**
	 * 路由地址
	 */
	@TableField("path")
	private String path;

	/**
	 * 组件路径
	 */
	@TableField("component")
	private String component;

	/**
	 * 显示排序
	 */
	@TableField("`sort`")
	private Integer sort = 0;

	/**
	 * 是否缓存
	 */
	@TableField("keep_alive")
	private Boolean keepAlive = true;

}
